<div class="component layui-hide-xs">
    <h3 class="title-sidebar"><i class="layui-icon">&#xe66f;</i>关于本人</h3>
    <ul class="layui-card">
        <li class="wx_qr">
            <img style="width: 150px;height: 150px" src="/static/home/picture/qr_code.jpg" alt=""><br>
            <a target="_blank" href="tencent://message/?uin=1175856954&Site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:1175856954:51" alt="点击这里给我发消息" title="点击这里给我发消息"/></a>
            <a target="_blank" href="https://gitee.com/ringer/blog.git"><img border="0" src="/static/home/picture/gitee.png" alt="gitee" title="项目地址"/></a>
        </li>
    </ul>
</div>
<div class="column">
    <a href="{{url('/article')}}"><h3 class="title-sidebar" style="border-bottom: 0;padding-bottom: 0;margin-bottom: 0;"> <i class="layui-icon">&#xe63c;</i> 文章归档</h3></a>
</div>
<div class="tags">
    <h3 class="title-sidebar"><i class="layui-icon">&#xe66e;</i>标签云</h3>
    <div>
        @foreach($tags as $tagCom)
            <a class="layui-btn layui-btn-xs layui-btn-primary tag-style-{{ $loop->index % 4 }}"
               href="{{ url("/tag/$tagCom->id") }}"
               title="{{ $tagCom->name }}">{{ $tagCom->name }}({{ $tagCom->articles_count }})</a>
        @endforeach
    </div>
</div>
<div class="column">
    <h3 class="title-sidebar"><i class="layui-icon">&#xe705;</i> 栏目分类</h3>
    <ul class="layui-row layui-col-space5">
        @foreach($categorys as $categoryCom)
            <li class="layui-col-md12 layui-col-xs6">
                <a href="{{ url("/category/$categoryCom->id") }}">
                    <i class="layui-icon">&#xe63c;</i> {{ $categoryCom->name }}
                    <span class="layui-badge layui-bg-gray">{{ $categoryCom->articles->count() }}</span>
                </a>
            </li>
        @endforeach
    </ul>
</div>
<div class="column">
    <h3 class="title-sidebar"><i class="layui-icon">&#xe756;</i>置顶推荐</h3>
    <ul class="layui-row layui-col-space5">
        @foreach($topArticles as $article)
            <li style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
                <i style="padding:0 5px; @if($loop->index < 3) background-color:red; @else background-color:#CCCCCC; @endif text-align:center; border-radius:50%;color:#FFFFFF">{{ $loop->iteration }}</i>
                <a href="{{ url("/article/$article->id") }}" title="{{ $article->title }}">{{ $article->title }}</a>
            </li>
        @endforeach
    </ul>
</div>
<div class="dynamic">
    <h3 class="title-sidebar"><i class="layui-icon">&#xe60c;</i>生活点滴 ~ </h3>
    <ul>
        @foreach($life_records as $life_record)
            <li><span class="layui-badge-dot layui-bg-gray"></span>
                <p>{{ $life_record->content }}
                    <small>{{ date("Y年m月d日 H:i:s",strtotime($life_record->created_at)) }}</small>
                </p>
            </li>
        @endforeach
    </ul>
</div>

<div class="link">
    <h3 class="title-sidebar"><i class="layui-icon">&#xe64c;</i>友情链接
        <a style="float: right;color: #666;" href="/">申请</a>
    </h3>
    <div>
        @foreach($links as $link)
            <a class="layui-btn layui-btn-xs layui-btn-primary" href="{{ $link->link }}" title='{{ $link->title }}'
               target="_blank">{{ $link->title }}</a>
        @endforeach
    </div>
</div>
